package cn.whale.killorder.domain;

import com.baomidou.mybatisplus.enums.IdType;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author whale.chen
 * @since 2020-12-02
 */
@TableName("t_kill_order")
@Data
public class KillOrder extends Model<KillOrder> {

    //订单状态 ： 0下单成功待支付，1，支付成功待出货，2，出货成功订单完成 ， 3，用户取消订单  4.订单失败[支付失败,出货失败]
    public static final int STATUS_ORDER_UN_PAY = 0;
    public static final int STATUS_ORDER_UN_DELIVERY = 1;
    public static final int STATUS_ORDER_DELIVERY_OK = 2;
    public static final int STATUS_ORDER_USER_CANCEL = 3;
    public static final int STATUS_ORDER_ERROR = 4;
    //支付状态：  0待支付 ，1.支付完成 2，支付失败或支付超时
    public static final int STATUS_PAY_UN_PAY = 0;
    public static final int STATUS_PAY_OK = 1;
    public static final int STATUS_PAY_FAILURE = 2;

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @TableField("order_no")
    private String orderNo;
    @TableField("total_price")
    private BigDecimal totalPrice;
    @TableField("kill_count")
    private Integer killCount;
    @TableField("create_time")
    private Date createTime;
    @TableField("pay_update_time")
    private Date payUpdateTime;

    //订单状态 ： 0下单成功待支付，1，支付成功待出货，2，出货成功订单完成 ， 3，用户取消订单  4.订单失败[支付失败,出货失败]
    @TableField("status_order")
    private Integer statusOrder;
    //支付状态：  0待支付 ，1.支付完成 2，支付失败或支付超时
    @TableField("status_pay")
    private Integer statusPay;
    @TableField("course_id")
    private Long courseId;
    @TableField("sessions_id")
    private Long sessionsId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
